<?php
/*
Plugin Name: 幻灯片
Version: 1.1
Plugin URL: http://alzhai.com/post-338.html
Description: 这个是幻灯片我没话说了
ForEmlog:5.2.1
Author: 啊咧咧
Author URL: http://alzhai.com
*/

!defined('EMLOG_ROOT') && exit('access deined!');

mysql_query("CREATE TABLE IF NOT EXISTS `".DB_PREFIX."hdengp` (
  `id` mediumint(10) unsigned NOT NULL AUTO_INCREMENT,
  `a` varchar(64) NOT NULL,
  `t` varchar(64) NOT NULL,
  `i` varchar(64) NOT NULL,
  `u` text NOT NULL,
  `m` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=40 ;");

function hdengp() {
	echo '<div class="sidebarsubmenu" id="hdengp"><a href="./plugin.php?plugin=hdengp">幻灯片</a></div>';
}

addAction('adm_sidebar_ext', 'hdengp');

function hdengp_h() {
$url='http://'.$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"];
$burl = 'http://'.$_SERVER['SERVER_NAME'].'/index.php';
if($url == $burl){?>
<iframe marginwidth=0 marginheight=0 hspace=0 src="http://<?php echo $_SERVER['SERVER_NAME']; ?>/content/plugins/hdengp/web.php"  frameborder=no scrolling=no style="width:770px; height:420px;"></iframe>
<?php }
}

addAction('index_loglist_top', 'hdengp_h');